<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <meta HTTP-EQUIV="Expires" CONTENT="0">
    <title>后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="/admin/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/style.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/login.css">
    <link rel="apple-touch-icon-precomposed" href="/admin/images/icon/icon.png">
    <link rel="shortcut icon" href="/admin/images/icon/favicon.ico">
    <script src="/admin/js/jquery-2.1.4.min.js"></script>

</head>

<body class="user-select">
<div class="container">
    <div class="siteIcon"><img src="/admin/images/icon/icon.png" alt="" data-toggle="tooltip" data-placement="top"
                               title="欢迎使用异清轩后台管理系统" draggable="false"/></div>

    <div style="width: 330px;" class="center-block alert alert-danger alert-dismissable ${(msg??)?string('','hide')}">
        <button type="button" class="close" data-dismiss="alert"
                aria-hidden="true">
            &times;
        </button>
    ${(msg)!}
    </div>
    <form action="/login" method="post" class="form-signin">
        <div align="center" style="color:red;">${(info)!}</div>
        <h2 class="form-signin-heading">管理员登录</h2>
        <label for="userName" class="sr-only">用户名</label>
        <input type="text" id="userAccount" name="userAccount" class="form-control" placeholder="请输入用户名" required
               autofocus autocomplete="off" maxlength="10">
        <label for="userPwd" class="sr-only">密码</label>
        <input type="password" id="userPassword" name="userPassword" class="form-control" placeholder="请输入密码" required
               autocomplete="off" maxlength="18">
        <button class="btn btn-lg btn-primary btn-block" type="submit" id="signinSubmit">登录</button>
    </form>

</div>
<script src="/admin/js/bootstrap.min.js"></script>
<script>
    $(function () {
        //解决session超时，登录页面只显示在mainframe上的问题
        if (top.location != location) {
            top.location.href = location.href;
        }
    });
    $('[data-toggle="tooltip"]').tooltip();
    window.oncontextmenu = function () {
        //return false;
    };
    $('.siteIcon img').click(function () {
        window.location.reload();
    });
    $('#signinSubmit').click(function () {
        if ($('#userAccount').val() === '') {
            $(this).text('用户名不能为空');
        } else if ($('#userPwd').val() === '') {
            $(this).text('密码不能为空');
        } else {
            $(this).text('请稍后...');
        }
    });
</script>
</body>
</html>
